package cn.zhoutingrui.pethome.utils;

public class AjaxResultUtil {
    private Boolean flag;
    private String msg;
    private Long total;

    public Long getTotal() {
        return total;
    }

    public AjaxResultUtil setTotal(Long total) {
        this.total = total;
        return this;
    }

    private Object data;
    
    public AjaxResultUtil(){
    }

    public AjaxResultUtil(Boolean flag,String msg){
        this.flag=flag;
        this.msg=msg;
    }
    
    public static AjaxResultUtil success(){

        return new AjaxResultUtil(true,"操作成功");
    }
    public static AjaxResultUtil fail(){
        return new AjaxResultUtil(false,"操作失败");
    }

    public Boolean getFlag() {
        return flag;
    }

    public AjaxResultUtil setFlag(Boolean flag) {
        this.flag = flag;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public AjaxResultUtil setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public Object getData() {
        return data;
    }

    public AjaxResultUtil setData(Object data) {
        this.data = data;
        return this;
    }
}
